#include<stdio.h>
#include<string.h>

int main()
{
    FILE *fp = fopen("log.txt", "a");
    if(fp == NULL)
    {
        perror("fopen");
        return 1;
    }

    const char *msg = "hello hello!\n";
    fprintf(fp, "%s", msg);


    fclose(fp);

    // printf("hello world\n");

    // fprintf(stdout, "hello fprintf\n");

    // const char *msg = "hello fwrite\n";
    // fwrite(msg, strlen(msg), 1, stdout);
    return 0;
}
